package com.xkstream.client.base;

import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;

/**
 * Created by xiaoyi on 2017/8/24.
 */

public abstract class BasePresenterImpl implements BasePresenter {
    CompositeDisposable compositeDisposable;

    public BasePresenterImpl() {
        this.compositeDisposable = new CompositeDisposable();
    }

    @Override
    public void subscribe(Disposable d) {
        compositeDisposable.add(d);
    }

    @Override
    public void unSubscribe() {
        compositeDisposable.clear();
    }
}
